package com.cloudkinto.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cloudkinto.entity.ProductInfoDo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloudkinto.extentity.product.MaterialDto;
import com.cloudkinto.extentity.product.ProductSkuAndIdDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;


import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 *  Mapper 接口
 * </p>
 * @author zhangyy
 * @since 2020-09-14
 */
@Mapper
public interface ProductInfoDao extends BaseMapper<ProductInfoDo> {
    List<ProductInfoDo> selectAll(IPage<ProductInfoDo> page, @Param("map") Map<String, String> map, List<Long> ids);

    List<ProductInfoDo> selectAll(@Param("map") Map<String, String> map, List<Long> ids);


    ProductInfoDo selectObject(@Param("id") Long id);

    void updateObject(Long id, Integer deleteFlag);

    List<MaterialDto> getMaterialList(IPage<MaterialDto> page, @Param("map") Map<String, String> map);

    List<MaterialDto> getMaterialList(@Param("map") Map<String, String> map);
    List<ProductInfoDo> selectOutProductIdsByOrderIds(@Param("idList") List<String> idList);

    List<ProductSkuAndIdDto> getProductSkuAndIdList(List<String> skuList, String field, Long companyId);

    List<ProductSkuAndIdDto> getFieldByProductIds(List<Long> productIds, String field, Long companyId);


    List<ProductSkuAndIdDto> getSubProductSkuAndIdList(List<String> skuList, Long companyId);

}
